<?php
session_start();
include "header.php";
$autenticado = $_SESSION["autentificado"];
$ultimoAcceso = $_SESSION["ultimoAcceso"];
$id_user = $_SESSION["id_user"];
$alert = $_GET["alert"];
switch($alert) {
	case 1 :
		$alert = "Error, el email ya está siendo utilizado";
		break;
	case 2 :
		$alert = "Debe llenar todos los campos obligatorios";
		break;
	case 3 :
		$alert = "El reCAPTCHA no se introdujo correctamente. Vuelva a intentarlo.";
		break;
	case 4 :
		$alert = "Formato del email no válido";
		break;
	case 5 :
		$alert = "Las contraseñas no coinciden";
		break;
		}
?>


  <html>
  <head>
    <title>Huelgas Manifestaciones - Registro</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <link href='./bootstrap/css/bootstrap.css' rel='stylesheet' type='text/css' />
    <link href='./bootstrap/css/bootstrap-responsive.css' rel='stylesheet' type='text/css' />
    <link rel='stylesheet' href='./admin/admin.css' type='text/css' />
    <script src='./bootstrap/js/bootstrap.js' type='text/javascript' charset='utf-8'></script>
    <script src='./scripts/jquery-1.7.1.js' type='text/javascript' charset='utf-8'></script>
    <script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-38378176-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
  </head>
  <body>
		<div id='content'>	
   
      <form action="new_user.php" class="well form-inline" id="register" method="post">  
  <h1>
    Regístrate
  </h1>
 
  
  <?  
    if($alert != "") {
      echo "
        <div class='alert alert-danger'>
          $alert
        </div>
      ";
    }
  ?>

         <label class="input-label">Tu email</label>
         <input type="text" class="input-large" name="email"  maxlength="100"><br><br>
         <label class="input-label">Password</label>
         <input type="password" name="password" class="input-large" size=28 maxlength=255><br><br>
         <label class="input-label">Repite Password</label>
         <input type="password" name="repite_password" class="input-large" size=28 maxlength=255><br><br>
         <label class="input-label">Nombre</label>
         <input type="text" class="input-large" name="nombre" size=28 maxlength=255><br><br>
         <label class="input-label">Organización</label>
         <input type="text" name="organizacion" class="input-large" size=28 maxlength=255><br><br>
        <?php
          require_once('./recaptcha/recaptchalib.php');
          $publickey = " 	6LehytwSAAAAALveoVy8os3T-vsQ1RNcuwl_iDLd
          "; // you got this from the signup page
          echo recaptcha_get_html($publickey);
        ?>

     <button type="submit" class="btn btn-info">Registrarse</button>
          <a href="index.php" class="btn" data-dismiss="modal" style="float: right;">Cerrar</a>
     </form>
    </div>
</body>
</html>